<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddRepairOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('repair_order', function(Blueprint $table){
            $table->increments('id');
            $table->string('open_id', 32);
            $table->integer('platform')->comment('机器类型 0-PC 1-手机');
            $table->string('description')->comment('描述');
            $table->integer('status')->default(0)->comment('0-未跟进 1-已联系 2-已解决 3-不解决');
            $table->integer('operator_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('repair_order');
    }
}
